import request from '@/utils/request'

//管理员分页查询用户列表
export const queryPageApi = (name,gender,begin,end,page,pageSize) => request.get(`/users?name=${name}&gender=${gender}&begin=${begin}&end=${end}&page=${page}&pageSize=${pageSize}`)

//管理员新增用户
export const addUserApi = (data) => request.post('/users', data)

//管理员根据ID查询用户信息
export const queryInfoApi = (id) => request.get(`/users/${id}`)

//管理员修改用户信息
export const updateUserApi = (data) => request.put('/users', data)

//管理员删除用户
export const deleteUserApi = (ids) => request.delete(`/users?ids=${ids}`)

//管理员查询所有用户
export const queryAllApi = () => request.get('/users/list')